<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>合伙店铺结算管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../layuiadmin/style/public.css" media="all">
		<!-- 图标库 -->
		<link rel="stylesheet" href="../../layuiadmin/font-awesome/css/font-awesome.min.css" /> 
	</head>
	<body>
		<div class="layui-fluid" id="LAY-component-grid-list">
			<div class="layui-card">
				<div class="layui-card-body">
					<!-- 搜索条件start -->
					<form class="layui-form meberMangement" action="">
						<div class="layui-row demo-list">
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg3">
								<div class="layui-form-item">
									<label class="layui-form-label">合伙店铺ID</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="精确搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg3">
								<div class="layui-form-item">
									<label class="layui-form-label">合伙店铺名称</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg3">
								<div class="layui-form-item">
									<label class="layui-form-label">店铺名</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="模糊搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg3">
								<div class="layui-form-item">
									<label class="layui-form-label">审核状态</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg">
								<div class="layui-form-item">
									<label class="layui-form-label">合伙店铺结算ID</label>
									<div class="layui-input-block">
										<input type="text" autocomplete="off" placeholder="精确搜索" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-col-sm3 layui-col-md3 layui-col-lg3">
								<div class="layui-form-item">
									<label class="layui-form-label">结算月份</label>
									<div class="layui-input-block">
										<select>
											<option value=""></option>
											<option value="">全部</option>
											<option value="0">1</option>
											<option value="1">2</option>
										</select>
									</div>
								</div>
							</div>												
							<div class="layui-col-sm12 layui-col-md12 layui-col-lg6">
								<div class="layui-btn-container" style="justify-content: flex-end;display: flex;">
									<button type="button" class="layui-btn">清空搜索</button>
									<button type="button" class="layui-btn">导出</button>
									<button type="button" class="layui-btn" style="margin-right: 0;">搜索</button>
								</div>
							</div>
						</div>
					</form>
					<!-- 搜索条件end -->
					<!-- tab标签start -->
					<div class="layui-tab custom-tab">
						<div style="justify-content:flex-start;display: flex;margin-bottom: -10px;">
							<ul class="layui-tab-title" style="border-bottom: none;">
								<li class="layui-this">
									<a href="#">全部</a>
								</li>
								<li>
									<a href="#">待审核</a>
								</li>
								<li>
									<a href="#">审核通过</a>
								</li>
								<li>
									<a href="#">问题结算</a>
								</li>
							</ul>
							
							<div class="layui-btn-container" style="margin-left: 20px;">
								<button type="button" class="layui-btn" style="margin:0;border: none;">批量审核</button>
								<button type="button" class="layui-btn layui-btn-primary" style="margin:0;border: none;">按总订单排序<i class="fa fa-sort" aria-hidden="true" style="margin-left: 5px;"></i></button>
								<button type="button" class="layui-btn layui-btn-primary" style="margin:0;border: none;">按货品ID排序<i class="fa fa-sort" aria-hidden="true" style="margin-left: 5px;"></i></button>
							</div>

						</div>

						<div class="layui-tab-content" style="padding: 0;">
							<div class="layui-tab-item layui-show">
								<!-- 合伙店铺结算管理start -->
								<div class="layui-table-meber2">
									<table id="allMember" lay-filter="allMember" class="layui-table"></table>
								</div>
								<!-- 合伙店铺结算管理end -->

								<!-- 操作start -->
								<script type="text/html" id="memberMsgOperate">
									<div>
									  <a class="layui-btn-xs small-btn" lay-event="audit">审核</a> |
									  <a class="layui-btn-xs small-btn" lay-event="effect">撤回重审</a>
								  </div>
								</script>
								<!-- 操作end -->
							</div>
						</div>
					</div>
					<!-- tab标签end -->
				</div>
			</div>
		</div>
		<script src="../../layuiadmin/layui/layui.js"></script>
		<script>
			layui.config({
				base: '../../layuiadmin/' //静态资源所在路径
			}).extend({
				index: 'lib/index' //主入口模块
			}).use(['index', 'form', 'element', 'table', 'laydate', 'layarea', 'layedit'], function() {
				var $ = layui.$,
					admin = layui.admin,
					element = layui.element,
					form = layui.form,
					table = layui.table,
					laydate = layui.laydate,
					layarea = layui.layarea,
					layedit = layui.layedit;

				layedit.build('demo'); //建立编辑器

				$("#shop").on('click', function() {
					$("#shop-container").toggle();
				});

				//表格实例
				table.render({
					elem: '#allMember',
					url: layui.setter.base + 'json/table/user.js' //数据接口
						,
					page: true //开启分页
						,
					limit: 5,
					cols: [
						[ //表头
							{
								type: 'numbers',
								align: 'center',
								title: '序号',
							}, {
								title: '操作',
								width: 180,
								align: 'center',
								toolbar: '#memberMsgOperate'
							}, {
								field: 'id',
								title: '合伙店铺结算ID',
								width: 120
							}, {
								field: 'id',
								title: '合伙店铺ID',
								width: 160
							}, {
								field: 'sex',
								title: '合伙店铺名称',
								width: 200
							}, {
								field: 'city',
								title: '店铺名',
								width: 160
							}, {
								field: 'experience',
								title: '审核状态',
								width: 160
							}, {
								field: 'logins',
								title: '结算月份',
								width: 160
							}, {
								field: 'wealth',
								title: '支付佣金商品总数',
								width: 300,
							}, {
								field: 'classify',
								title: '支付佣金会员总数',
								width: 160,
							}, {
								field: 'score',
								title: '支付佣金订单总数',
								width: 160,
							}, {
								field: 'sign',
								title: '支付佣金订单总成交额',
								width: 200
							}, {
								field: 'sign',
								title: '佣金',
								width: 200
							}, {
								field: 'sign',
								title: '审核人',
								width: 200
							}, {
								field: 'sign',
								title: '审核时间',
								width: 200
							},
						]
					]
				});

				//监听工具条
				table.on('tool(allMember)', function(obj) {
					var data = obj.data;
					console.log(data);
					switch (obj.event) {
						case 'effect':
							// 撤回重审
							layer.confirm('审核是否通过？', {
								title: '撤回重审',
								icon: 3,
								btn: ['审核通过', '问题结算'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
						case 'audit':
							// 审核
							layer.confirm('审核是否通过？', {
								title: '温馨提示',
								icon: 3,
								btn: ['审核通过', '审核不通过'] //按钮
							}, function(index) {
								// 确定
								layer.close(index);
							}, function() {
								// 取消
							});
							break;
					}
					// if(obj.event === 'detail'){
					//   layer.msg('ID：'+ data.id + ' 的查看操作');
					// } else if(obj.event === 'del'){
					//   layer.confirm('真的删除行么', function(index){
					//     obj.del();
					//     layer.close(index);
					//   });
					// } else if(obj.event === 'edit'){
					//   layer.alert('编辑行：<br>'+ JSON.stringify(data))
					// }
				});	
			});
		</script>
	</body>
</html>
